package com.vhall.component.entity.room.enums;

import com.vhall.component.entity.dictionary.enums.BaseEnum;

/**
 * RoomJoinsPreLiveEnum-
 *
 * @author xing.wang
 * @date 2023/11/2
 */
public enum RoomJoinsPreLiveEnum implements BaseEnum {
    PRE_LIVE(1,"直播前进入")
    ,AFTER_LIVE(0,"直播后进入")
    ;
    private final Integer value;
    private final String name;
    RoomJoinsPreLiveEnum(Integer value, String name) {
        this.value = value;
        this.name = name;
    }

    @Override
    public Integer getValue() {
        return value;
    }

    @Override
    public String getName() {
        return name;
    }
    public static String getNameByValue(Integer value) {
        for (RoomJoinsPreLiveEnum e : RoomJoinsPreLiveEnum.values()) {
            if (e.getValue().equals(value)) {
                return e.getName();
            }
        }
        return null;
    }
}
